<template>
  <el-container id="system">
    <el-header>
      <h1>
        管理员管理系统
        <span class="login" style="float: right">
          <el-link :underline="false" icon="el-icon-user"
            ><router-link to="/login">登录</router-link></el-link
          >
        </span>
      </h1>
      <!-- 登录 -->
    </el-header>
    <el-container>
      <el-aside width="200px">
        <el-menu :router="true">
          <el-submenu
            v-for="item in menuData"
            :key="item.index"
            :index="item.index"
          >
            <template slot="title">
              <i :class="item.icon"></i>
              <span>{{ item.text }}</span>
            </template>
            <el-menu-item
              v-for="sub in item.subMenu"
              :key="sub.index"
              :index="sub.index"
              >{{ sub.text }}</el-menu-item
            >
          </el-submenu>
        </el-menu>
      </el-aside>
      <el-main><router-view></router-view></el-main>
    </el-container>
  </el-container>
</template>
<script>
export default {
  data() {
    return {
      menuData: [
        {
          icon: "el-icon-s-custom",
          index: "1",
          text: "管理员管理",
          subMenu: [
            { index: "/adminsSystem/adminsSystem", text: "管理员新增" },
            { index: "/adminsSystem/adminsList", text: "管理员列表" },
          ],
        },
        {
          icon: "el-icon-bell",
          index: "2",
          text: "销售员管理",
          subMenu: [
            { index: "/adminsSystem/salesmansList", text: "销售员列表" },
            { index: "/adminsSystem/salesmansAdd", text: "新增销售员" },
          ],
        },

        {
          icon: "el-icon-loading",
          index: "4",
          text: "保险产品管理",
          subMenu: [
            {
              index: "/adminsSystem/insuresList",
              text: "产品列表",
            },
            { index: "/adminsSystem/insuresAdd", text: "新增产品" },
          ],
        },
        {
          icon: "el-icon-notebook-2",
          index: "5",
          text: "保险订单管理",
          subMenu: [
            { index: "/adminsSystem/orderlist", text: "所有订单" },
            { index: "/adminsSystem/orderPayState", text: "退保订单" },
          ],
        },
        {
          icon: "el-icon-loading",
          index: "6",
          text: "客户管理",
          subMenu: [
            {
              index: "/adminsSystem/customersList",
              text: "客户列表",
            },
          ],
        },
        {
          icon: "el-icon-loading",
          index: "7",
          text: "理赔管理",
          subMenu: [
            { index: "/adminsSystem/claimsList", text: "理赔列表" },
            { index: "/adminsSystem/claimsAdd", text: "新增理赔" },
            { index: "/adminsSystem/claimsUpdate/:_id", text: "修改理赔" },
          ],
        },
        // {icon:'el-icon-s-custom',index:'1', text: '管理员管理', subMenu:[
        //     {index: '/system/', text: '自己写'},
        //     {index: '/system/',text: '自己写'}
        // ]},
        // {icon:'el-icon-bell',index:'2', text: '销售员管理', subMenu:[
        //     {index: '/system/', text: '自己写'},
        //     {index: '/system/',text: '自己写'}
        // ]},
        // {icon:'el-icon-loading',index:'3', text: '保险分类管理', subMenu:[
        //     {index: '/system/', text: '自己写'},
        //     {index: '/system/',text: '自己写'}
        // ]},

        // {icon:'el-icon-loading',index:'5', text: '保险订单管理', subMenu:[
        //     {index: '/system/', text: '自己写'},
        //     {index: '/system/',text: '自己写'}
        // ]},
        // {icon:'el-icon-loading',index:'6', text: '客户管理', subMenu:[
        //     {index: '/system/', text: '自己写'},
        //     {index: '/system/',text: '自己写'}
        // ]},
        // {icon:'el-icon-loading',index:'7', text: '理赔管理', subMenu:[
        //     {index: '/system/', text: '自己写'},
        //     {index: '/system/',text: '自己写'}
        // ]},
      ],
    };
  },
  methods: {},
};
</script>

<style lang="scss">
body {
  margin: 0;
}
#system {
  min-height: 100vh;
  h1 {
    margin: 0;
  }
}
.el-header,
.el-footer {
  background-color: #b3c0d1;
  color: #333;
  padding-left: 100px;
  line-height: 60px;
}

.el-aside {
  background-color: #d3dce6;
  color: #333;
  text-align: center;
}

.el-main {
  background-color: #e9eef3;
  color: #333;
}
.el-menu {
  width: 100%;
}
</style>
